import Vue from 'vue'
import Router from 'vue-router'
/*自己测试*/
import testPage1 from '@/components/zhytest/zhytest1'
import testPage2 from '@/components/zhytest/zhytest2'
import testPage3 from '@/components/zhytest/zhytest3'
import testPage4 from '@/components/zhytest/zhytest4'
import testPage5 from '@/components/zhytest/zhytest5'
import testPage6 from '@/components/zhytest/zhytest6'
import testEchartPage from '@/components/zhytest/zhytestEchart'
import testPage8 from '@/components/zhytest/zhytest8'
import demoPage from '@/components/front/demo/demo'
import demo1 from '@/components/front/demo/demo1'
import demo2 from '@/components/front/demo/demo2'
import demo3 from '@/components/front/demo/demo3'



/*系统首页、注册、登录、注销、前台、后台*/
import indexPage from '@/components/index'
import registerPage from '@/components/register'
import loginPage from '@/components/login'
import logoutPage from '@/components/logout'
import frontPage from '@/components/front'
import backPage from '@/components/back'


/*系统前台页面*/
import workbenchPage from '@/components/front/workbench/workbench'
// 挂号
import registrationPage from '@/components/front/registration/registration'
import registration1 from '@/components/front/registration/registration1'
import registration2 from '@/components/front/registration/registration2'
import registration3 from '@/components/front/registration/registration3'
import registrationInsert from '@/components/front/registration/registrationInsert'
import registrationEdit from '@/components/front/registration/registrationEdit'
import registrationViewDetails2 from '@/components/front/registration/registrationViewDetails2'
import registrationViewDetails3 from '@/components/front/registration/registrationViewDetails3'
// 新开就诊
import newtreatPage from '@/components/front/newtreat/newtreat'
import record from '@/components/front/newtreat/record'
import recipe from '@/components/front/newtreat/recipe'
import recipeInsert from '@/components/front/newtreat/recipeInsert'



import retailPage from '@/components/front/retail/retail'
// 收费管理
import chargePage from '@/components/front/charge/charge'
import charge1Page from '@/components/front/charge/charge1'
import charge2Page from '@/components/front/charge/charge2'
import charge3Page from '@/components/front/charge/charge3'
import chargeRealPage from '@/components/front/charge/chargeReal'
import chargeDetailPage from '@/components/front/charge/chargeDetail'






/*系统后台页面*/
import employeePage from '@/components/back/employee/employee'
import employee1 from '@/components/back/employee/employee1'
import employee2 from '@/components/back/employee/employee2'
import employee3 from '@/components/back/employee/employee3'
import employeeInsert1 from '@/components/back/employee/employeeInsert1'
import employeeInsert2 from '@/components/back/employee/employeeInsert2'
import employeeInsert3 from '@/components/back/employee/employeeInsert3'

//患者信息
import patientPage from '@/components/back/patient/patient'
import patientInsert from '@/components/back/patient/patientInsert'

// 药品信息管理
import drugInfoPage from '@/components/back/drug/drugInfo/drugInfo'
import drugInfoInsert from '@/components/back/drug/drugInfo/drugInfoInsert'
import drugInstoragePage from '@/components/back/drug/drugInstorage'
import drugOutstoragePage from '@/components/back/drug/drugOutstorage'
import drugInventoryPage from '@/components/back/drug/drugInventory/drugInventory'
import drugInventoryDetail from '@/components/back/drug/drugInventory/drugInventoryDetail'
import drugStockTakingPage from '@/components/back/drug/drugStockTaking/drugStockTaking'
import drugStockTakingDetail from '@/components/back/drug/drugStockTaking/drugStockTakingDetail'
import drugAdjustPricePage from '@/components/back/drug/drugAdjustPrice/drugAdjustPrice'
import drugAdjustPriceSon1 from '@/components/back/drug/drugAdjustPrice/drugAdjustPriceSon1'
import drugAdjustPriceSon2 from '@/components/back/drug/drugAdjustPrice/drugAdjustPriceSon2'
// 经营概况
import summaryPage from '@/components/back/summary'
// 统计报表
import statisChargePage from '@/components/back/statistical/statisCharge'
import statisPatientPage from '@/components/back/statistical/statisPatient'
import statisInspectionItemPage from '@/components/back/statistical/statisInspectionItem'
import statisDrugPage from '@/components/back/statistical/statisDrug'
// 系统设置
import confClinicInfoPage from '@/components/back/sysConfig/confClinicInfo'
import confDictionaryTbPage from '@/components/back/sysConfig/confDictionaryTb'
import confInspectionItemPage from '@/components/back/sysConfig/confInspectionItem'
import confSupplierPage from '@/components/back/sysConfig/confSupplier/confSupplier'
import confSupplierInsert from '@/components/back/sysConfig/confSupplier/confSupplierInsert'
import confSupplierEdit from '@/components/back/sysConfig/confSupplier/confSupplierEdit'
import confTemplatePage from '@/components/back/sysConfig/confTemplate'
import confCostPage from '@/components/back/sysConfig/confCost'
import confBasicPage from '@/components/back/sysConfig/confBasic'







Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/index'/*默认访问重定向到首页*/
    },
    {
      path: '/index',
      name: 'indexName',
      component: indexPage
    },
    /*系统注册、登录、注销*/
    {
      path: '/register',
      name: 'registerName',
      component: registerPage
    },
    {
      path: '/login',
      name: 'loginName',
      component: loginPage
    },
    {
      path: '/logout',
      name: 'logoutName',
      component: logoutPage
    },
    /*系统前台页面*/
    {
      path: '/front',
      name: 'frontName',
      component: frontPage,
      redirect: '/workbench',
      children: [
        {
          path: '/workbench',
          name:'workbenchName',
          component: workbenchPage
        },
        // 挂号
        {
          path: '/registration',
          name:'registrationName',
          component: registrationPage
        },{
          path: '/registration1',
          name:'registrationName1',
          component: registration1
        },{
          path: '/registration2',
          name:'registrationName2',
          component: registration2
        },{
          path: '/registration3',
          name:'registrationName3',
          component: registration3
        },{
          path: '/registrationInsert',
          name:'registrationInsertName',
          component: registrationInsert
        },
        {
          path: '/registrationEdit',
          name:'registrationEditName',
          component: registrationEdit
        },
        {
          path: '/registrationViewDetails2',
          name:'registrationViewDetails2Name',
          component: registrationViewDetails2
        },
        {
          path: '/registrationViewDetails3',
          name:'registrationViewDetails3Name',
          component: registrationViewDetails3
        },
        // 新开就诊
        {
          path: '/newtreat',
          name:'newtreatName',
          component: newtreatPage
        },{
          path: '/record',
          name:'recordName',
          component: record
        },{
          path: '/recipe',
          name:'recipeName',
          component: recipe
        },{
          path: '/recipeInsert',
          name:'recipeInsert',
          component: recipeInsert
        },
        // 药品零售
        {
          path: '/retail',
          name:'retailName',
          component: retailPage
        },
        {
          path: '/charge',
          name:'chargeName',
          component: chargePage
        },

        {
          path:'/demo',
          name:'demoName',
          component:demoPage
        },{
          path:'/demo1',
          name:'demoName2',
          component:demo1
        },{
          path:'/demo2',
          name:'demoName2',
          component:demo2
        },{
          path:'/demo3',
          name:'demoName3',
          component:demo3
        }

      ]
    },
    {
      path: '/charge1',
      name:'charge1Name',
      component: charge1Page
    },
    {
      path: '/charge2',
      name:'charge2Name',
      component: charge2Page
    },
    {
      path: '/charge3',
      name:'charge3Name',
      component: charge3Page
    }
    ,{
      path:'/chargeReal',
      name:'chargeRealName',
      component:chargeRealPage
    },{
      path:'/chargeDetail',
      name:'chargeDetailName',
      component:chargeDetailPage
    },

    /*系统后台页面*/
    {
      path: '/back',
      name: 'backName',
      component: backPage,
      redirect: '/employee',
      children: [
        {
          path: '/employee',
          name:'employeeName',
          component: employeePage
        },{
          path: '/employee1',
          name:'employeeName1',
          component: employee1
        },{
          path: '/employee2',
          name:'employeeName2',
          component: employee2
        },{
          path: '/employee3',
          name:'employeeName3',
          component: employee3
        }
        ,{
          path:'/employeeInsert1',
          name:'employeeInsert1Name',
          component:employeeInsert1
        },{
          path:'/employeeInsert2',
          name:'employeeInsert2Name',
          component:employeeInsert2
        },{
          path:'/employeeInsert3',
          name:'employeeInsert3Name',
          component:employeeInsert3
        },
        // 患者
        {
          path: '/patient',
          name:'patientName',
          component: patientPage
        },{
          path: '/patientInsert',
          name:'patientInsertName',
          component: patientInsert
        },
        /*药品信息管理*/
        {
          path:'/drugInfo',
          name:'drugInfoName',
          component:drugInfoPage
        },
        {
          path:'/drugInfoInsert',
          name:'drugInfoInsert',
          component:drugInfoInsert
        },
        {
          path:'/drugInstorage',
          name:'drugInstorageName',
          component:drugInstoragePage
        },{
          path:'/drugOutstorage',
          name:'drugOutstorageName',
          component:drugOutstoragePage
        },{
          path:'/drugInventory',
          name:'drugInventoryName',
          component:drugInventoryPage
        },{
          path:'/drugInventoryDetail',
          name:'drugInventoryDetailName',
          component:drugInventoryDetail
        },{
          path:'/drugStockTaking',
          name:'drugStockTakingName',
          component:drugStockTakingPage
        },{
          path:'/drugStockTakingDetail',
          name:'drugStockTakingDetailName',
          component:drugStockTakingDetail
        },{
          path:'/drugAdjustPrice',
          name:'drugAdjustPriceName',
          component:drugAdjustPricePage
        },{
          path:'/drugAdjustPriceSon1',
          name:'drugAdjustPriceSon1Name',
          component:drugAdjustPriceSon1
        },{
          path:'/drugAdjustPriceSon2',
          name:'drugAdjustPriceSon2Name',
          component:drugAdjustPriceSon2
        },

        // 经营概况
        {
          path: '/summary',
          name:'summaryName',
          component: summaryPage
        },
        /*统计报表*/
        {
          path:'/statisCharge',
          name:'statisChargeName',
          component:statisChargePage
        },{
          path:'/statisPatient',
          name:'statisPatientName',
          component:statisPatientPage
        },{
          path:'/statisInspectionItem',
          name:'statisInspectionItemName',
          component:statisInspectionItemPage
        },{
          path:'/statisDrug',
          name:'statisDrugName',
          component:statisDrugPage
        }
        /*系统设置*/
        ,{
          path:'/confClinicInfo',
          name:'confClinicInfoName',
          component:confClinicInfoPage
        },{
          path:'/confDictionaryTb',
          name:'confDictionaryTbName',
          component:confDictionaryTbPage
        },{
          path:'/confInspectionItem',
          name:'confInspectionItemName',
          component:confInspectionItemPage
        },{
          path:'/confSupplier',
          name:'confSupplierName',
          component:confSupplierPage
        },{
          path:'/confSupplierInsert',
          name:'confSupplierInsertName',
          component:confSupplierInsert
        },{
          path:'/confSupplierEdit',
          name:'confSupplierEditName',
          component:confSupplierEdit
        },{
          path:'/confTemplate',
          name:'confTemplateName',
          component:confTemplatePage
        },{
          path:'/confCost',
          name:'confCostName',
          component:confCostPage
        },{
          path:'/confBasic',
          name:'confBasicName',
          component:confBasicPage
        },



      ]
    }








    /*自己测试*/
    ,{
      path:'/test1',
      name:'testName1',
      component:testPage1
    },{
      path:'/test2',
      name:'testName2',
      component:testPage2
    },{
      path:'/test3',
      name:'testName3',
      component:testPage3
    },{
      path:'/test4',
      name:'testName4',
      component:testPage4
    },{
      path:'/test5',
      name:'testName5',
      component:testPage5
    },{
      path:'/test6',
      name:'testName6',
      component:testPage6
    },{
      path:'/testEchart',
      name:'testEchartName',
      component:testEchartPage
    },{
      path:'/test8',
      name:'testName8',
      component:testPage8
    }
  ]
})
